cmake_minimum_required(VERSION 3.0.0)

project(example)

set(PULGIN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/testPlumaPlugins/plugin)
set(INTERFACE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/testPlumaPlugins/interface)
set(LoaderManager_DIR ${CMAKE_CURRENT_SOURCE_DIR}/testPlumaPlugins/loaderManager)
set(PlumaCore_DIR ${CMAKE_CURRENT_SOURCE_DIR}/testPlumaCore)

set(CMAKE_CXX_STANDARD 11)

include_directories(
    ${PULGIN_DIR}
    ${INTERFACE_DIR}
)

link_libraries(Pluma dl)

aux_source_directory(${PULGIN_DIR} tPlumaPluginsSRC)
message(FUNNING ${tPlumaPluginsSRC})

#gen plugins
add_library(Eagel SHARED ${PULGIN_DIR}/Eagle.cpp)
add_library(Jaguar SHARED ${PULGIN_DIR}/Jaguar.cpp)
add_library(SimpleWarrior SHARED ${PULGIN_DIR}/SimpleWarrior.cpp)

#gen manager loader
add_executable(tPluginLoader ${LoaderManager_DIR}/main.cpp)

#gen plumaCore load has channel callback
add_executable(tPlumaCore ${PlumaCore_DIR}/main.cpp)